#include<iostream>
#include</usr/local/include/sw/redis++/redis++.h>
#include<unordered_map>
#include<string>
#include<vector>

using std::cout;
using std::endl;
using std::vector;
using std::unordered_map;
using std::string;

void test1(sw::redis::Redis& redis)
{
    printf("Generic 系列命令:\n");
    redis.set("key1","111");
    redis.set("key2","222");

    redis.get("key2");

}
void test2(sw::redis::Redis& redis)
{
    std::cout<<"exists"<<std::endl;
    redis.flushall();
    redis.set("key1","111");
    redis.set("key2","222");

    long long result=redis.exists({"key1","key2","key3"});

    std::cout<<result<<std::endl;

}

int main()
{
    sw::redis::Redis redis("tcp://127.0.0.1:6379");
    //string result=redis.ping();
    //test1(redis);
    test2(redis);
    //std::cout<<result<<std::endl;

    return 0;
}